#include  <cstdio>

int main(int argc, char *argv[])
{
	int n;
	scanf("%d",&n);
	while( n!=0 )
	{
		int arr[30];
		int sum = 0;
		for( int i = 0 ; i < n ; ++i )
		{
			scanf("%d",&arr[i]);
			sum += arr[i];
		}

		int avg = sum/2;
		if(sum % avg != 0)
		{
			printf("No equal partitioning.\n");
			scanf("%d",&n);
			continue;
		}

		sum = 0;
		for( int i = 0 ; i < n ; ++i )
		{
			sum += arr[i];
			if(sum == avg)
			{
				printf("Sam stops at position %d and Ella stops at position %d.\n",
						i+1,i+2);
				break;
			}
			if( sum > avg )
			{
				printf("No equal partitioning.\n");
				break;
			}
		}
		
		scanf("%d",&n);
	}
}
